package ifi.p17.jarmanagement.control;

import java.util.Calendar;

public class TimeDate {
	String year, month, day;
	String h, m, s;

	public TimeDate() {
		final Calendar c = Calendar.getInstance();
		year = Integer.toString(c.get(Calendar.YEAR));
		month = Integer.toString(c.get(Calendar.MONTH) + 1);
		day = Integer.toString(c.get(Calendar.DAY_OF_MONTH));
		h = Integer.toString(c.get(Calendar.HOUR));
		m = Integer.toString(c.get(Calendar.MINUTE));
		s = Integer.toString(c.get(Calendar.SECOND));
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

	public String getH() {
		return h;
	}

	public void setH(String h) {
		this.h = h;
	}

	public String getM() {
		return m;
	}

	public void setM(String m) {
		this.m = m;
	}

	public String getS() {
		return s;
	}

	public void setS(String s) {
		this.s = s;
	}

	public String getYearMonthDay(){
		return year + "/" + month + "/" + day;
	}
	
	public String getHMS(){
		return h + ":" + m + ":" + s ;
	}
	
	public String toString(){
		return getYearMonthDay() + " " + getHMS();
	}
}
